<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><!--JBuilder QuickDoc-->
<HEAD>
<TITLE>Class parser.Token</TITLE><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
</HEAD>
<BODY>

<H2>
<FONT SIZE="-1">parser</FONT>
<BR>Class Token</H2>
<DL>
<DT>public class <B>Token</B>
</DL>
<DL><DD>Describes the input token stream.<DL><DD></DD></DL></DD>
</DL>
<DL></DL>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF"><TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B>
</FONT></TD></TR></TABLE>

<A NAME="kind"></A>

<H3>kind</H3>
<PRE>
public int <B>kind</B></PRE>
<DL><DD>An integer that describes the kind of this token. This numbering system is determined by JavaCCParser, and a table of these numbers is stored in the file ...Constants.java.<DL><DD></DD></DL></DD>
</DL>
<DL></DL>
<HR>

<A NAME="beginLine"></A>

<H3>beginLine</H3>
<PRE>
public int <B>beginLine</B></PRE>
<DL><DD>beginLine and beginColumn describe the position of the first character of this token; endLine and endColumn describe the position of the last character of this token.<DL><DD></DD></DL></DD>
</DL>
<DL></DL>
<HR>

<A NAME="beginColumn"></A>

<H3>beginColumn</H3>
<PRE>
public int <B>beginColumn</B></PRE>
<DL><DD>beginLine and beginColumn describe the position of the first character of this token; endLine and endColumn describe the position of the last character of this token.<DL><DD></DD></DL></DD>
</DL>
<DL></DL>
<HR>

<A NAME="endLine"></A>

<H3>endLine</H3>
<PRE>
public int <B>endLine</B></PRE>
<DL><DD>beginLine and beginColumn describe the position of the first character of this token; endLine and endColumn describe the position of the last character of this token.<DL><DD></DD></DL></DD>
</DL>
<DL></DL>
<HR>

<A NAME="endColumn"></A>

<H3>endColumn</H3>
<PRE>
public int <B>endColumn</B></PRE>
<DL><DD>beginLine and beginColumn describe the position of the first character of this token; endLine and endColumn describe the position of the last character of this token.<DL><DD></DD></DL></DD>
</DL>
<DL></DL>
<HR>

<A NAME="image"></A>

<H3>image</H3>
<PRE>
public java.lang.String <B>image</B></PRE>
<DL><DD>The string image of the token.<DL><DD></DD></DL></DD>
</DL>
<DL></DL>
<HR>

<A NAME="next"></A>

<H3>next</H3>
<PRE>
public parser.Token <B>next</B></PRE>
<DL><DD>A reference to the next regular (non-special) token from the input stream. If this is the last token from the input stream, or if the token manager has not read tokens beyond this one, this field is set to null. This is true only if this token is also a regular token. Otherwise, see below for a description of the contents of this field.<DL><DD></DD></DL></DD>
</DL>
<DL></DL>
<HR>

<A NAME="specialToken"></A>

<H3>specialToken</H3>
<PRE>
public parser.Token <B>specialToken</B></PRE>
<DL><DD>This field is used to access special tokens that occur prior to this token, but after the immediately preceding regular (non-special) token. If there are no such special tokens, this field is set to null. When there are more than one such special token, this field refers to the last of these special tokens, which in turn refers to the next previous special token through its specialToken field, and so on until the first special token (whose specialToken field is null). The next fields of special tokens refer to other special tokens that immediately follow it (without an intervening regular token). If there is no such token, this field is null.<DL><DD></DD></DL></DD>
</DL>
<DL></DL>
<HR>

<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF"><TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B>
</FONT></TD></TR></TABLE>

<A NAME="toString()"></A>

<H3>toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL><DD>Returns the image.<DL><DD></DD></DL></DD>
</DL>
<DL></DL>
<HR>

<A NAME="newToken(int)"></A>

<H3>newToken</H3>
<PRE>
public static final parser.Token <B>newToken</B>(int&nbsp;ofKind)</PRE>
<DL><DD>Returns a new Token object, by default. However, if you want, you can create and return subclass objects based on the value of ofKind. Simply add the cases to the switch for all those special cases. For example, if you have a subclass of Token called IDToken that you want to create if ofKind is ID, simlpy add something like : case MyParserConstants.ID : return new IDToken(); to the following switch statement. Then you can cast matchedToken variable to the appropriate type and use it in your lexical actions.<DL><DD></DD></DL></DD>
</DL>
<DL></DL>
<HR>

</BODY>
</HTML>